﻿Module Helpers
    Public Function HaveToken() As Boolean
        If String.IsNullOrEmpty(My.Settings.Token) OrElse String.IsNullOrEmpty(My.Settings.TokenSecret) Then
            Return False
        Else
            Return True
        End If
    End Function

    Function Getproxy() As System.Net.WebProxy
        Dim p As New System.Net.WebProxy(My.Settings.ProxyAddress, My.Settings.ProxyPort)
        If Not (String.IsNullOrEmpty(My.Settings.ProxyUsername) OrElse String.IsNullOrEmpty(My.Settings.ProxyPassword)) Then
            p.Credentials = New System.Net.NetworkCredential(My.Settings.Username, My.Settings.Password)
        End If
        Return p
    End Function
End Module
